{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# アスキーアート\n",
    "\n",
    "## Mario\n",
    "\n",
    "$\n",
    "\\color{red}{\n",
    "  \\Rule2mm2mm0mm\n",
    "  \\Rule6mm4mm0mm\n",
    "  \\mathbb{M}\n",
    "  \\Rule6mm2mm0mm\n",
    "}\n",
    "\\color{lightyellow}{\\hspace-18mm{\\lower6mm{\n",
    "  \\Rule2mm4mm0mm\n",
    "  \\Rule4mm0mm4mm\n",
    "  \\Rule8mm6mm4mm\n",
    "  \\Rule2mm4mm4mm\n",
    "  \\Rule2mm4mm2mm\n",
    "  \\Rule2mm2mm0mm\n",
    "}}}\n",
    "\\color{gray}{\\hspace-22mm{\\lower4mm{\n",
    "  \\Rule2mm2mm2mm\n",
    "  \\Rule2mm4mm4mm\n",
    "  \\Rule4mm4mm2mm\n",
    "  \\Space4mm0mm0mm\n",
    "  \\Rule2mm4mm0mm\n",
    "  \\Rule2mm0mm4mm\n",
    "  \\lower2mm{\\Rule4mm0mm2mm}\n",
    "}}}\n",
    "\\lower8mm{\\verb|  < Here we go!|}\n",
    "$\n",
    "\n",
    "## Luigi\n",
    "\n",
    "$\n",
    "\\newcommand{\\r}[4]{\\hspace {#1 mm} \\lower {#2 mm} {\\Rule {#3 mm} {0mm} {#4 mm} } \\hspace{-#3 mm} \\hspace{-#1 mm}}\n",
    "\\color{lightyellow}{\\r{3}{2}{6}{4}\\r{3}{3}{8}{4}\\r{10}{4}{2}{1}\\r{0}{10}{3}{3}\\r{9}{10}{3}{3}}\n",
    "\\color{brown}{\\r{2}{2}{3}{3}\\r{2}{2}{1}{4}\\r{1}{3}{2}{2}\\r{7}{2}{1}{2}\\r{8}{4}{1}{2}\\r{7}{5}{4}{1}\\r{2}{7}{6}{2}\\r{1}{8}{9}{3}\\r{0}{14}{4}{2}\\r{8}{14}{4}{2}}\n",
    "\\color{lightgreen}{\\r{3}{0}{5}{2}\\r{2}{1}{9}{1}\\r{3}{10}{6}{3}\\r{2}{12}{3}{3}\\r{7}{12}{3}{3}\\r{4}{7}{1}{5}\\r{7}{8}{1}{4}}\n",
    "$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# LaTeX 書き方\n",
    "\n",
    "## そのまま出力\n",
    "\n",
    "$\n",
    "\\verb|そのまま 出力 \\\\|\n",
    "$\n",
    "\n",
    "## かっこ\n",
    "\n",
    "\\leftと\\rightで囲むとちょうどいい大きさになる\n",
    "\n",
    "囲んで無い場合\n",
    "$\n",
    "( \\frac{1}{n} )\n",
    "$\n",
    "\n",
    "囲んでる場合\n",
    "$\n",
    "\\left( \\frac{1}{n} \\right)\n",
    "$\n",
    "\n",
    "「{」と「}」\n",
    "\n",
    "$\\left\\{A\\right\\}$\n",
    "\n",
    "## 上かっこの注釈をつける\n",
    "\n",
    "$\\overbrace{a + \\cdots + z}^{26}$\n",
    "\n",
    "\n",
    "## 方程式の左の括弧\n",
    "\n",
    "begin{cases}を使う\n",
    "\n",
    "$\n",
    "\\begin{cases}\n",
    "\\dot{x} = Ax + Bu\\\\\n",
    "y = Cx\n",
    "\\end{cases}\n",
    "$\n",
    "\n",
    "## 中央に式を表示する\n",
    "\n",
    "### 「$$」で囲む\n",
    "\n",
    "「\\$」で囲んだ場合\n",
    "\n",
    "$y = ax + b$\n",
    "\n",
    "「\\$\\$」で囲んだ場合\n",
    "\n",
    "$$y = ax + b$$\n",
    "\n",
    "$\n",
    "\n",
    "### alignを使う\n",
    "\n",
    "\\begin{align*}\n",
    "\\left(\\int_0^\\infty\\frac{\\sin x}{\\sqrt{x}}\\,dx\\right)^2 &= \\sum_{k=0}^\\infty\\frac{(2k)!}{2^{2k}(k!)^2}\\frac{1}{2k+1} \\\\\n",
    "&= \\prod_{k=1}^\\infty\\frac{4k^2}{4k^2-1} \\\\\n",
    "&= \\frac{\\pi}{2}\n",
    "\\end{align*}\n",
    "\n",
    "\\begin{align}\n",
    "z & = x + i y, \\\\\n",
    "f(z) & = u(z) + i v(z), \\\\\n",
    "\\end{align}\n",
    "\n",
    "## 式中にテキストを入れる\n",
    "\n",
    "$\n",
    "\\partial_\\mu F^{\\mu \\nu} = e \\sum \\bar{\\psi}_Q \\gamma^\\nu Q\\psi_Q\n",
    "\\text{＜Maxwell方程式＞}\n",
    "$\n",
    "\n",
    "## displaystyle\n",
    "\n",
    "式を大きく表示する\n",
    "\n",
    "displaystyleなし\n",
    "\n",
    "$\n",
    "\\sum_{n=1}^{\\infty} \\frac1{n}\n",
    "$\n",
    "\n",
    "displaystyleあり\n",
    "\n",
    "$\n",
    "\\displaystyle \\sum_{n=1}^{\\infty} \\frac1{n}\n",
    "$\n",
    "\n",
    "LaTeXで初めて数式を書き始める人で色々覚えるのが超苦手な人にはディスプレイ数式のために align* 環境を一つだけ教えるというのはありだと思います。\n",
    "\n",
    "& と \\\\ を使わなければたぶん equation* 環境と同じ。\n",
    "\n",
    "改行して縦に揃えたい場合には & で縦に揃える場所を指定して、改行したい場所に \\\\ と書く。\n",
    "\n",
    "equation* 環境で数式を書いておいて、後で途中で改行したくなったときに、align* に書き直すのが面倒なことがよくある。\n",
    "\n",
    "最初から全部 align* で統一して問題ないんじゃないかと思うことが結構ある。\n",
    "\n",
    "\n",
    "$$\\omega=f dx+ g dy+h dz$$ と書くと間隔が詰まってしまうので、$$\\verb|\\omega=f \\,dx+ g\\,dy+h\\,dz|$$と \\, で微小な空白を挿入して$$\\omega=f \\,dx+ g\\,dy+h\\,dz$$とする。\n",
    "\n",
    "$$\\require{color}\\color{cyan}\\Large\\text{dx の前には \\, を入れる！}$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 微分\n",
    "\n",
    "$  \\frac{dy}{dt}=\\sqrt{(1-y^2)(1-k^2y^2)} $\n",
    "\n",
    "$ \\left.\\frac{dy}{dx}\\right|_{x=a} $\n",
    "\n",
    "$ m\\frac{{\\rm d}^2x}{{\\rm d}t^2} = -kx $\n",
    "\n",
    "$  q''=-k\\left.\\frac{\\partial T}{\\partial y}\\right|_{y=0} $\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 積分\n",
    "\n",
    "$ \\int dx = x + C $\n",
    "\n",
    "$ \\oint \\frac{1}{z} \\mathrm{d}z = 2\\pi i \\mathrm{Res}(0) = 2\\pi i $\n",
    "\n",
    "$ \\log z = \\int_1^z \\frac{dt}{t} $\n",
    "\n",
    "$\n",
    "\\int \\frac{d\\theta}{1+\\theta^2} =\n",
    "\\tan^{-1}\\theta+C\n",
    "$\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 複素数\n",
    "\n",
    "$ \\log z =\\log |z|+i( \\arg z +2nπ) \\quad(n∈ℤ) $\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 数列の和\n",
    "\n",
    "$\n",
    "\\sum_{k=1}^{n}k^2\n",
    "=\\overbrace{1^2+2^2+1\\cdots+n^2}^{n} \n",
    "=\\frac{1}{6}n(n+1)(2n+1)\n",
    "$\n",
    "\n",
    "$\n",
    "\\mathop{\\lower1ex\\hbox{$\\huge\\Sigma$}}_{n=1}^{\\infty} \\frac1{n}\n",
    "$\n",
    "\n",
    "$\n",
    "\\qquad \\sum_{n=1}^{\\infty} \\frac1{n}\n",
    "$\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 行列\n",
    "\n",
    "$\n",
    " \\det A=\n",
    "  \\begin{vmatrix}\n",
    "   a & b \\\\\n",
    "   c & d\n",
    "  \\end{vmatrix}\n",
    "  =ad-bc\n",
    "$\n",
    "\n",
    "$\n",
    "\\boldsymbol{a}\\times\\boldsymbol{b}\n",
    "=\n",
    "\\begin{pmatrix}\n",
    "a_1\\\\\n",
    "a_2\\\\\n",
    "a_3\\\\\n",
    "\\end{pmatrix}\n",
    "\\times\n",
    "\\begin{pmatrix}\n",
    "b_1\\\\\n",
    "b_2\\\\\n",
    "b_3\\\\\n",
    "\\end{pmatrix}\n",
    "=\n",
    " \\begin{pmatrix}\n",
    "a_2b_3-a_3b_2\\\\\n",
    "a_3b_1-a_1b_3\\\\\n",
    "a_1b_2-a_2b_1\\\\\n",
    "\\end{pmatrix}\n",
    "$\n",
    "\n",
    "$\n",
    "\\begin{pmatrix}\n",
    "a_{11} & \\cdots & a_{1m}\\\\\n",
    "\\vdots & \\ddots & \\vdots\\\\\n",
    "a_{n1} & \\cdots &a_{nm}\\\\\n",
    "\\end{pmatrix}=A_{n\\times m}\n",
    "$\n",
    "\n",
    "$\n",
    "\\begin{eqnarray}A = \\left(  \\begin{array}{cccc}    a_{ 11 } & a_{ 12 } & \\ldots & a_{ 1n } \\\\    a_{ 21 } & a_{ 22 } & \\ldots & a_{ 2n } \\\\    \\vdots & \\vdots & \\ddots & \\vdots \\\\    a_{ m1 } & a_{ m2 } & \\ldots & a_{ mn }  \\end{array}\\right)\\end{eqnarray}\n",
    "$\n",
    "\n",
    "これを$(i,j)$成分が$a_{ij}$の二次元の行列$A_{n\\times m}$と考えて、\n",
    "$m$次元の行列として考えたいのは$(i_1,i_2,\\cdots, i_m)$成分が$a_{i_1i_2\\cdots i_m}$となるような行列$A_{n_1\\times\\cdots\\times n_m}$\n",
    "この高次元の行列の加算については各成分を足すと定義するのが自然だと思う。\n",
    "\n",
    "$$\n",
    "({\\bf A} \\times {\\bf B})_i =\\sum_{j,k}^{}\\epsilon_{ijk}A_jB_k\n",
    "$$\n",
    "\n",
    "\n",
    "pmatrix\n",
    "\n",
    "$\\begin{pmatrix}y_1\\\\y_2\\\\{\\vdots}\\\\y_n\\end{pmatrix}=\\begin{pmatrix}a_{11}&a_{12}&...&a_{1m}\\\\a_{21}&a_{22}&...&a_{2m}\\\\{\\vdots}&{\\vdots}&{\\vdots}&{\\vdots}\\\\a_{n1}&a_{n2}&...&\n",
    "a_{nm}\\end{pmatrix}\\begin{pmatrix}x_1\\\\x_2\\\\{\\vdots}\\\\x_m\\end{pmatrix}$\n",
    "\n",
    "bmatrix\n",
    "\n",
    "$\\begin{bmatrix}y_1\\\\y_2\\\\{\\vdots}\\\\y_n\\end{bmatrix}=\\begin{bmatrix}a_{11}&a_{12}&...&a_{1m}\\\\a_{21}&a_{22}&...&a_{2m}\\\\{\\vdots}&{\\vdots}&{\\vdots}&{\\vdots}\\\\a_{n1}&a_{n2}&...&\n",
    "a_{nm}\\end{bmatrix}\\begin{bmatrix}x_1\\\\x_2\\\\{\\vdots}\\\\x_m\\end{bmatrix}$\n",
    "\n",
    "boldsymbol使うと意味が記述しやすいですね。（行列$\\boldsymbol{0}$とスカラー値$0$の違い）\n",
    "$$\\bar{\\boldsymbol{A}} = \\begin{bmatrix}\\boldsymbol{A}&\\boldsymbol{0}\\\\-\\boldsymbol{C}&0\\end{bmatrix}$$\n",
    "\n",
    "$$\\boldsymbol{0}=\\begin{pmatrix}0\\\\0\\end{pmatrix}$$\n",
    "$$\\boldsymbol{1}=\\begin{pmatrix}1\\\\1\\end{pmatrix}$$\n",
    "\n",
    "$$\\begin{align*}\\mathbf{0}&=\\begin{pmatrix}0\\\\0\\end{pmatrix}\\\\ {\\bf 0}&=\\begin{bmatrix}0\\\\0\\end{bmatrix}\\end{align*}$$\n",
    "\n",
    "私はbmatrix派。pmatrixは横幅が無駄に広くなる。\n",
    "\n",
    "$$\\begin{align*}\\mathbf{0}&=\\begin{pmatrix}0\\\\0\\end{pmatrix}\\\\ {\\bf 0}&=\\begin{bmatrix}0\\\\0\\end{bmatrix}\\end{align*}$$\n",
    "\n",
    "$$\n",
    "{\\boldsymbol a}=\n",
    "\\begin{bmatrix}a_1\\\\a_2\\end{bmatrix}, \n",
    "\\quad\n",
    "{\\boldsymbol 0}=\n",
    "\\begin{bmatrix}0\\\\0\\end{bmatrix}\n",
    "$$\n",
    "\n",
    "こっちの方(\\boldsymbol)が \\mathbf より好き。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 解析力学\n",
    "\n",
    "$\\frac{\\partial L}{\\partial x_i}-\\frac{d}{dt}\\frac{\\partial L}{\\partial\\dot{x_i}} =0 \\\\(x_1,x_2,x_3)=(x,y,z)$\n",
    "\n",
    "Eular・Lagrangu Equation\n",
    "\n",
    "Example\n",
    "\n",
    "$L=\\frac{1}{2}mv^2-U(x)$の場合\n",
    "$\\frac{\\partial L}{\\partial x}=\\frac{\\partial U}{\\partial x},\\frac{\\partial L}{\\partial \\dot{x}}=mv$\n",
    "$ma=F$になり，ニュートンの運動方程式と一致\n",
    "\n",
    "【解析力学】\n",
    "ラグランジュの運動方程式\n",
    "(Lagrange's equations of motion)\n",
    "$$\\frac{d}{dt} \\left( \\frac{\\partial L\n",
    "}{\\partial \\dot{q}_i} \\right) - \\frac{\\partial L\n",
    "}{\\partial q_i} = 0$$\n",
    "\n",
    "【解析力学】一般化運動量(generalized momentum)\n",
    "$$p_i=\\frac{\\partial L\n",
    "}{\\partial \\dot{q_i}}$$\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 化学式\n",
    "\n",
    "$\\require{mhchem}\\ce{H2O}$\n",
    "\n",
    "$ \n",
    "\\require{mhchem}\n",
    "\\ce{CH3COCH3}\n",
    "$\n",
    "\n",
    "$\n",
    "\\require{mhchem}\n",
    "\\begin{align*}\n",
    "&\\ce{2KMnO4 + 5(COOH)2 + 3H2SO4}\\\\\n",
    "&\\ce{-> 2MnSO4 + 10CO2 + K2SO4 + 8H2O}\n",
    "\\end{align*}\n",
    "$\n",
    "\n",
    "$\\require{mhchem}\\ce{$\\ce{Ag+ + Cl- -> AgCl v}$}$\n",
    "\n",
    "ニホニウム\n",
    "\n",
    "$\n",
    "\\ce{^{70}_{30}Zn + ^{209}_{83}Bi -> ^{278}_{113}Nh + ^{1}_{0}n}\n",
    "$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# ブラケット\n",
    "\n",
    "$\n",
    "\\newcommand{\\ket}[1]{\\vert{#1}\\rangle}\\newcommand{\\bra}[1]{\\langle{#1}\\vert}\\newcommand{\\bracket}[2]{\\langle{#1}\\vert {#2} \\rangle}\n",
    "\\ket{\\varphi}\\overset{{\\text{d.c.}}}{\\rightleftharpoons}\\bra{\\varphi}\n",
    "$\n",
    "\n",
    "$\n",
    "\\newcommand{\\ket}[1]{\\vert{#1}\\rangle}\\newcommand{\\bra}[1]{\\langle{#1}\\vert}\\newcommand{\\bracket}[2]{\\langle{#1}\\vert {#2} \\rangle}\n",
    "\\bra{a}\\ket{b}\\\\\n",
    "\\bracket{a}{b}\\\\\n",
    "$\n",
    "\n",
    "$\n",
    "\\newcommand{\\ket}[1]{\\vert{#1}\\rangle}\\newcommand{\\bra}[1]{\\langle{#1}\\vert}\\newcommand{\\bracket}[2]{\\langle{#1}\\vert {#2} \\rangle}\n",
    "\\begin{cases}\n",
    "\\overbrace{\\ket{a}\\bra{b}}^{\\text{q-number}}\\overbrace{c\\rangle}^{\\text{ket}}\n",
    "\\\\\\\\\n",
    "\\underbrace{\\ket{a}}_{\\text{ket}}\\underbrace{\\bra{b}c\\rangle}_{\\text{c-number}}\n",
    "\\end{cases}\n",
    "$\n",
    "\n",
    "$\n",
    "\\newcommand{\\ket}[1]{\\vert {#1} \\rangle} \\newcommand{\\bra}[1]{\\langle {#1} \\vert}\n",
    "\\newcommand{\\bracket}[2]{\\langle {#1} \\vert {#2} \\rangle}\n",
    "\\bra{a}\\\\\n",
    "\\ket{b}\\\\\n",
    "\\bracket{\\phi}{\\psi}\n",
    "$\n",
    "\n",
    "$\n",
    "\\newcommand{\\bra}{\\langle}\n",
    "\\newcommand{\\ket}{\\rangle}\n",
    "\\bra\\phi\\vert\\hat{a}\\vert\\psi\\ket\n",
    "$\n",
    "\n",
    "$\\psi(x)=\\langle x|\\psi\\rangle$\n",
    "\n",
    "$\\hat{x}|\\boldsymbol{x}\\rangle=\\boldsymbol{x}|\\boldsymbol{x}\\rangle$\n",
    "\n",
    "$ \\hat{H}\\vert \\Phi \\rangle =E \\vert \\Phi \\rangle  $"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# デルタ関数\n",
    "\n",
    "\n",
    "$\n",
    "\\delta(x-a)=\n",
    "\\begin{cases}\n",
    "\\infty&x=a\\\\\n",
    "0&x\\neq a\n",
    "\\end{cases}\n",
    "$\n",
    "\n",
    "$\\text{such that}$\n",
    "\n",
    "$\n",
    "\\int_{-\\infty}^{\\infty}\\delta(x-a)=1\n",
    "$\n",
    "\n",
    "$\n",
    "\\delta_{i,j}=\n",
    "\\begin{cases}\n",
    "1&i=j\\\\\n",
    "0&i\\neq j\n",
    "\\end{cases}\n",
    "$\n",
    "\n",
    "$\n",
    "\\int_{-\\infty}^{\\infty}f(x)\\delta(x-a)dx=f(a)\n",
    "$\n",
    "\n",
    "$$\n",
    "\\int_{-\\infty}^{\\infty}f(x)\\delta(x-a)dx=f(a)\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# Cauchy-Riemann equations\n",
    "\n",
    "Complex variable and function:\n",
    "\\begin{align}\n",
    "z & = x + i y, \\\\\n",
    "f(z) & = u(z) + i v(z), \\\\\n",
    "\\end{align}\n",
    "Cauchy's integral formula:\n",
    "$$\n",
    "f(z) = \\frac{1}{2 \\pi i} \\oint \\frac{f(\\zeta)}{\\zeta - z} d\\zeta.\n",
    "$$\n",
    "Cauchy-Riemann equations:\n",
    "$$\n",
    "\\begin{cases}\n",
    "\\partial_x u = \\partial_y v, \\\\\n",
    "\\partial_y u = - \\partial_x v.\n",
    "\\end{cases}\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# 未分類\n",
    "\n",
    "3 つ目の式の証明． ${\\rm card} A = \\mathfrak{m}$ である集合 $A$ をとると， ${\\rm card} \\varnothing = 0$ であるから，\n",
    "\\begin{align*}\n",
    "  \\mathfrak{m} \\cdot 0 &= {\\rm card} (A \\times \\varnothing) \\\\\n",
    "                       &= {\\rm card} \\varnothing \\\\\n",
    "                       &= 0.\n",
    "\\end{align*}\n",
    "\n",
    "分数と小数とアデール\n",
    "\n",
    "\\begin{align*}\n",
    "&\\mathbb{Q} = \\varinjlim \\mathbb{Z} / s \\\\\n",
    "&\\widehat{\\mathbb{Z}} = \\varprojlim n \\backslash \\mathbb{Z} \\\\\n",
    "&\\mathbb{A} = \\widehat{\\mathbb{Z}} \\times \\mathbb{R} \\\\\n",
    "&\\mathbb{A}_\\mathbb{Q} = \\mathbb{A} \\otimes \\mathbb{Q}\n",
    "\\end{align*}\n",
    "\n",
    "（副有限完備化は$p$毎に見ると小数だよね）\n",
    "\n",
    "$P(A|X)=\\frac{P(X|A)P(A)}{\\sum_AP(X|A)P(A)}$\n",
    "\n",
    "$\\Delta x \\Delta p \\geq\\frac{\\hbar}{2}$\n",
    "\n",
    "偏極恒等式(内積の右が線型の場合)\n",
    "$\n",
    "\\langle\\psi,\\phi\\rangle=\\frac{1}{4}\\sum_{\\alpha=\\pm 1,\\pm i}\n",
    "\\alpha^*||\\psi+\\alpha\\phi||^2\n",
    "$\n",
    "\n",
    "$\n",
    "\\begin{split}\n",
    "a&=b+c\\\\\n",
    "&=z\n",
    "\\end{split}\n",
    "$\n",
    "\n",
    "交換関係$[\\hat x, \\hat p] =i\\hbar $より、不確定性関係$\\Delta x \\Delta p \\leq \\frac{\\hbar}{2}$を示せ。\n",
    "\n",
    "$\\operatorname{div}\\boldsymbol{B}=0$\n",
    "\n",
    "$\\nabla^2\\phi=0$\n",
    "\n",
    "\n",
    "$P(k) \\sim k^{-\\gamma}$\n",
    "\n",
    "一般の場合の $k$-mutation は歪対称行列 $C=[c_{ij}]=[d_ib_{ij}]$ の言葉で記述しておくと, quiver を用いた直観的理解と相性が良くなる. $c'_{ij}=d_ib'_{ij}$ とおくと, \n",
    "\\begin{equation*}\n",
    " c'_{ij} =\n",
    " \\begin{cases}\n",
    "  -c_{ij}                 & \\text{if $i=k$ or $j=k$}, \\\\\n",
    "  c_{ij}+c_{ik}c_{kj}/d_k & \\text{if $c_{ik},c_{kj}>0$}, \\\\\n",
    "  c_{ij}-c_{ik}c_{kj}/d_k & \\text{if $c_{ik},c_{kj}<0$}, \\\\\n",
    "  c_{ij}                  & \\text{otherwise}.\n",
    " \\end{cases}\n",
    "\\end{equation*}\n",
    "$b_{ij}$, $b'_{ij}$ の場合との違いは $d_k$ で割るという操作が\n",
    "入っていることである.\n",
    "\n",
    "\n",
    "$\n",
    "\\begin{align*}\n",
    "(\\cos\\theta_k + i\\sin\\theta_k)^5\n",
    "&= \\cos5\\theta_k + i\\sin5\\theta_k \\\\\n",
    "&= \\cos2k\\pi + i\\sin2k\\pi \\\\\n",
    "&= 1 \\\\\n",
    "\\end{align*}\n",
    "$\n",
    "\n",
    "$\n",
    "\\begin{array}{cccccccccccccccccccc}\n",
    "360 &=& 2&\\times&2&\\times&2&\\times&3&\\times&3&      & &\\times&5&      &  \\\\\n",
    "378 &=& 2&      & &      & &\\times&3&\\times&3&\\times&3&      & &\\times&7 \\\\\n",
    "\\hline\n",
    "\\text{最小公倍数} &=& 2&\\times&2&\\times&2&\\times&3&\\times&3&\\times&3&\\times&5&\\times&7 \\\\\n",
    "\\text{最大公約数} &=& 2&      & &      & &\\times&3&\\times&3&      & &      & &      &  \\\\\n",
    "\\end{array}\n",
    "$\n",
    "\n",
    "$ \\left( \\frac{2x+3}{4} \\right)^2 $\n",
    "\n",
    "$D=\\{0,1,3 \\}$\n",
    "\n",
    "$ x^2 + \\sqrt[3]{x} $\n",
    "\n",
    "$$\n",
    "\\int_0^1 \\frac{x}{x^2+1}\\, dx=\\frac12 \\log 2\n",
    "$$\n",
    "\n",
    "dxの前の\\, は小さな空白．省略可\n",
    "\n",
    "$$4 \\pi G = c = \\varepsilon_0 = \\mu_0 = k = h/2 \\pi i = 1$$\n",
    "として次元を除去しています。\n",
    "$$h = 2\\pi i$$\n",
    "とすると、エネルギーや距離や時間に偏角の$\\pi/4$が残るので、次元計算もできます。$\\mod 8$だけど。\n",
    "\n",
    "これで実世界の量をマップするとこんな感じです。\n",
    "\n",
    "$[L_i,L_j]=i\\hbar \\epsilon_{ijk}L_k$\n",
    "\n",
    "$\\lim_{x\\to0}\\frac{\\sin x}{x}=1$\n",
    "\n",
    "関数 $ f(x) $ と定数 $ a $ に対し、 $ f(x) $ が、 $ x=a $ で微分可能であるとき、曲線 $ y=f(x) $ は、点 $(a,f(a)) $において直線$y=f(a)=f'(a)(x-a)$に接する。\n",
    "\n",
    "正規分布の確率密度関数は\n",
    "$\n",
    "f(x)=\\frac{1}{\\sqrt{2\\pi}\\sigma}\\mathrm{exp} \\left( -\\frac{(x - \\mu)^2}{2\\sigma^2} \\right)\n",
    "$\n",
    "で表される。特に，平均$\\mu=0$，分散$\\sigma^2=1$であるものを$\\bf{\\text{標準正規分布}}$という。\n",
    "\n",
    "$\n",
    "e=\\lim_{n\\to\\infty}\\left( 1+\\frac{1}{n} \\right)^n\n",
    "$\n",
    "\n",
    "$$\n",
    "e=\\lim_{n\\to\\infty}\\left( 1+\\frac{1}{n} \\right)^n\n",
    "$$\n",
    "\n",
    "$\\displaystyle \\sum_{k=1}^{\\infty}\\dfrac{1}{k(k+1)}=\\displaystyle \\sum_{k=1}^{\\infty}\\left( \\dfrac{1}{k}-\\dfrac{1}{k+1}\\right)\\\\\n",
    "　　　　　\\hspace{6.2mm}=1-\\displaystyle \\lim_{k\\rightarrow \\infty}\\dfrac{1}{k+1}\\\\\n",
    "　　　　　\\hspace{6.2mm}=1$\n",
    "\n",
    "エンタルピーの完全微分表記\n",
    "\n",
    "$   \n",
    "dH\n",
    "=\\left(\\frac {\\partial H}{\\partial T}\n",
    "\\right)_pdT\n",
    "+\\left(\\frac{\\partial H}{\\partial p}\\right)_Tdp\n",
    "=C_pdT+\\mu_Tdp\n",
    "$\n",
    "\n",
    "\\begin{eqnarray*}\n",
    "&&\\lim_{h\\rightarrow0}\\frac{(x+h)^n-x^n}{h}\\\\\n",
    "&=&\\lim_{h\\rightarrow0}\\frac{\\sum_{i=1}^n {}_nC_ih^ix^{n-i}}{h}\\\\\n",
    "&=&\\lim_{h\\rightarrow0}\\sum_{i=1}^n {}_nC_i h^{i-1}x^{n-i} \\\\\n",
    "&=&\\lim_{h\\rightarrow0}\\left\\{nx^{n-1}+h(\\sum_{i=2}^n {}_nC_i h^{i-2}x^{n-i})\\right\\}\\\\\n",
    "&=&nx^{n-1}\n",
    "\\end{eqnarray*}\n",
    "\n",
    "$\\varepsilon$\n",
    "\n",
    "$\\epsilon$\n",
    "\n",
    "デルタx\n",
    "Δx\n",
    "⊿x\n",
    "\n",
    "$\\Delta x$\n",
    "\n",
    "$\\varDelta x$\n",
    "\n",
    "${\n",
    "e^{ix}=\\cos{x}+i\\sin{x}\n",
    "}$\n",
    "\n",
    "ナビエ・ストークス方程式\n",
    "\n",
    "$\\frac{\\partial V}{\\partial t}+(V\\cdot \\nabla)V=-\\nabla p+\\frac{1}{Re}\\Delta V$\n",
    "\n",
    "$$ ",
    "\\vec{a}$$\n",
    "より\n",
    "$$\\overrightarrow{a}$$\n",
    "の方がずれなくて良いかもね。\n",
    "\n",
    "$\\text{Back-cab's Rule}$\n",
    "\n",
    "$ \\vec a \\times ( \\vec b \\times \\vec c ) = \\vec b ( \\vec a \\cdot \\vec c ) - \\vec c ( \\vec a \\cdot \\vec b) $\n",
    "\n",
    "$\n",
    "\\int {f'(x) \\over f(x)} dx = \\log |f(x)|\n",
    "$\n",
    "\n",
    "$$\n",
    "\\mathcal{L}=\\frac{1}{2}\\left[(\\partial \\vec{\\varphi})^{2}+\\mu^{2}\\vec{\\varphi}^{2}\\right]-\\frac{\\lambda}{4}\\left(\\vec{\\varphi}^{2} \\right)^{2} \n",
    "$$\n",
    "\n",
    "\\begin{eqnarray}\n",
    " (1&)& \\begin{cases}\n",
    "    |x+y| = 1 & \\\\\n",
    "    |x-y| = 1 &\n",
    "  \\end{cases}\\\\\n",
    " (2&)& \\begin{cases}\n",
    "    |x+y|+|x-y| = 1 & \\\\\n",
    "    |x|+|y| = 1 &\n",
    "  \\end{cases}\\\\\n",
    "(3&)& \\begin{cases}\n",
    "    ||x|-|y|| = 1 & \\\\\n",
    "    y = x &\n",
    "  \\end{cases}\n",
    "\\end{eqnarray}\n",
    "\n",
    "$$\\text{可観測性}\\cong\\text{オブザーバー構築可能}$$\n",
    "\n",
    "「こうやって書いたらこういう意味」って結構物理だとある気がする\n",
    "$$\\int_{\\partial S}\\boldsymbol{a}･d\\boldsymbol{l}$$\n",
    "って書いで何も言わなくても「$S$という面が存在してその縁を$\\partial S$としてその縁に沿って$\\boldsymbol{a}$を線積分だな」って思っちゃう\n",
    "\n",
    "$$\\boldsymbol{\\bar A}, \\quad \\bar A$$なるほど、\\boldsymbol は \\bar も太くしてくれているのか。\n",
    "\n",
    "$$\n",
    "\\mathcal{SUDOKU} \\\\\n",
    "\\begin{array}{|c|c|c|c|c|c|c|c|c|} \\hline\n",
    "5 & 3 &  &  & 7 &  &  &  &  \\\\ \\hline \n",
    "6 &  &  & 1 & 9 & 5 &  &  &  \\\\ \\hline\n",
    " & 9 & 8 &  &  &  &  & 6 &  \\\\ \\hline\n",
    "8 &  &  &  & 6 &  &  &  & 3 \\\\ \\hline\n",
    "4 &  &  & 8 &  & 3 &  &  & 1 \\\\ \\hline\n",
    "7 &  &  &  & 2 &  &  &  & 6 \\\\ \\hline\n",
    " & 6 &  &  &  &  & 2 & 8 &  \\\\ \\hline\n",
    " &  &  & 4 & 1 & 9 &  &  & 5 \\\\ \\hline\n",
    " &  &  &  & 8 &  &  & 7 & 9 \\\\ \\hline\n",
    "\\end{array}\n",
    "$$\n",
    "\n",
    "$\\vec v \\\\ \\vec{v}\\\\ \\vec(v)$\n",
    "\n",
    "\\vec v \\\\ \\vec{v}\\\\ \\vec(v)\n",
    "うーむ？\n",
    "\n",
    "$ e^{i\\theta}=\\cos\\theta+i\\sin\\theta $\n",
    "\n",
    "$\\times$のことはtimesと呼んだ方がかかっけぇな\n",
    "\n",
    "$$\\beta = \\frac{1}{k_BT}$$\n",
    "\n",
    "$y=ax,z=bx$のとき\n",
    "$\\begin{pmatrix} y\\\\z\\end{pmatrix}=\\begin{pmatrix} a\\\\b\\end{pmatrix}x$\n",
    "とまとめて書く\n",
    "\n",
    "$$p_i(\\beta)=\\frac{e^{-\\beta E_i}}{\\sum_j e^{-\\beta E_j}}$$の形の式は数学の応用先に普遍的によく出て来る。統計力学において分母は $Z(\\beta)$ と書かれ、分配函数と呼ばれ、パラメーター $\\beta$ は逆温度と呼ばれる：$$Z(\\beta)=\\sum_j e^{-\\beta E_j}$$絶対温度 $0$ と $\\beta=\\infty$ が対応し、絶対温度 $\\infty$ と $\\beta=+0$ が対応する。$\\beta< 0$ は負の絶対温度に対応するが、絶対温度 $\\infty$ よりも高温な状況を想像しなければいけない。\n",
    "\n",
    "上の式は次に一般化される：\\begin{align*}\n",
    "&p_i(\\beta)=e^{-\\beta E_i}q_i/Z(\\beta),\\\\\n",
    "&Z(\\beta)=\\sum_i e^{-\\beta E_i}q_i.\n",
    "\\end{align*}ここで $q_i\\geqq0$, $\\sum_i q_i=1$.\n",
    "\n",
    "$\n",
    "\\begin{align}\n",
    "\\newcommand{\\f}[1]{\n",
    "\\begin{array}{ccc}\n",
    "#1 & #1 & #1\\\\\n",
    "#1 & \\color{red}{#1} & #1\\\\\n",
    "#1 & #1 & #1\n",
    "\\end{array}\n",
    "}\n",
    "\\f{\\f{\\f{\\bullet}}}\n",
    "\\end{align}\n",
    "$\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
